<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>

<%@ page contentType = "text/html;charset=GBK" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/oval-tag.tld" prefix="oval" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>
<%
  String strModuleName = "OGM";
  String privilegeCode = "10103,L102";
%>
<%
  //get curuser info
  HashMap CurUserInfo = (HashMap)session.getAttribute("userinfo");
  String strCurOrgName = (String)CurUserInfo.get("orgname");
  Integer nCurOrgId = (Integer)CurUserInfo.get("orgid");
  if(nCurOrgId == null)
  {
    nCurOrgId = new Integer(-1234567);
  }
%>
<%--<%@ include file="/inc/Security.inc" %>--%>
<%@ include file="/inc/FrmDefault.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/LocationDefault.inc" %>
<PageFlow:CheckPageFlow pageName="p_selectsepllcn"/>
<%

  	Vector items = (Vector) pageContext.getAttribute("totalsummary");
		if (items == null) {
			items = new Vector();
		}

		StringBuffer itemsJS = new StringBuffer();
		itemsJS.append("[");
		for (Iterator iter = items.iterator(); iter.hasNext();) {
			Map item = (Map) iter.next();
			itemsJS.append("{");
			Set keys = item.keySet();
			for (Iterator iterator = keys.iterator(); iterator.hasNext();) {
				String key = (String) iterator.next();
				String value = "";
				if(item.get(key) != null){
					value = ((Object) item.get(key)).toString();
				}
				itemsJS.append(key).append(" : '").append(value).append("'");
				if (iterator.hasNext()) {
					itemsJS.append(", ");
				}
			}
			itemsJS.append("}");
			if (iter.hasNext()) {
				itemsJS.append(", ");
			}
		}
		itemsJS.append("]");
		
		response.setCharacterEncoding("UTF-8");  
	    response.setContentType("application/json; charset=utf-8");  
	    response.getWriter().write(itemsJS.toString());
		//out.println(itemsJS);
%>